/*LICENSE_BEGIN
 * ******************************************************************
 * Copyright 2006 by the Dainamite Robocup-Team at the
 * DAI-Labor, TU-Berlin (www.dai-labor.de)
 * 
 * Members of Dainamite are:
 * Holger Endert
 * Robert Wetzker
 * Thomas Karbe
 * Axel Heßler
 * Philippe Bütter
 * Felix Brossmann
 * 
 * Licensed under the GNU GPL (General Public License) Free Software 
 * License, Version 2. You may use this file only in compliance with 
 * the License. You may obtain a copy of the License at:
 * 
 * http://www.fsf.org/licensing/licenses/gpl.txt
 * ******************************************************************
LICENSE_END*/
package robocup.component.infotypes;

import robocup.parser9.Token;

/**
 * ChangeOpponentTypeInfo is received, if the opponents team changed a
 * heterogeneous player-type assignment.
 */
public class ChangeOpponentTypeInfo extends Info {
	
	/**
	 * The number of the player, who has a new player-type.
	 */
	protected int playerNumber;

	
	/**
	 * Constructs an info object, indicating that the opponents team changed a
	 * player type of an agent
	 * 
	 * @param playerNumber -
	 *            the agents unum
	 */
	public ChangeOpponentTypeInfo(Token playerNumber) {
		super(-1);
		this.playerNumber = Integer.parseInt(playerNumber.toString());
		this.infoType = TYPE_OPLAYERTYPE;
	}

	/**
	 * @return Returns the number of the exchanged player.
	 */
	public int getPlayerNumber() {
		return this.playerNumber;
	}

}
